import React from "react";

import routeWithUserSession from "@/components/ApplicationArea/routeWithUserSession";
import PageHeader from "@/components/PageHeader";
import {  Col, Row} from 'antd/lib';
import NoticeToolbar from "@/components/notice/NoticeToolbar";
import NoticeToolbarorg from "@/components/notice/NoticeToolbarorg";
import routes from "@/services/routes";

class NoticeNew extends React.Component {

  componentWillMount() {

  }

  render() {
    return (
      <div className="settings-screen">
        <div className="container">
          <div  style={{width:"400px",height:"40px"}}>
            <div style={{width:"20px",height:"38px", float: "left"}}>
            </div>
              <div style={{width:"50px",height:"38px", float: "left"}}>
              <img src="/static/images/contractfinish.png"/>
            </div>
              <div style={{width:"320px",height:"30px",float:"left"}}>
              <h3 style={{margin:"7px",padding:"0"}}>{this.props.warns==="2" ? '附件池':'资料'}</h3>
            </div>
          </div>
            <div className="p-15">
            {this.props.warns==="2" && (<NoticeToolbarorg />)}
            {this.props.warns !="2" && (<NoticeToolbar />)}
            </div>
        </div>
      </div>
    );
  }
}

routes.register(
  "Notice.New",
  routeWithUserSession({
    path: "/notice/new",
    title: "资料",
    render: pageProps => <NoticeNew {...pageProps}  warns="1"/>,
  })
);

routes.register(
  "Notice.Neworg",
  routeWithUserSession({
    path: "/notice/neworg",
    title: "附件池",
    render: pageProps => <NoticeNew {...pageProps}  warns="2"/>,
  })
);